package edu.sctu.xiangkun.day201506.day20150605.TextThree;


import java.util.Date;

/**
 * Created by lenovo on 2015/6/5.
 */
public class DateDemo {

    public boolean setDateDemo() {
        Date date1 = new Date();
        Date date2 = new Date();
        System.out.println("date1:"+date1.toString());
        System.out.println("date2:"+date2.toString());
        boolean str = date1.after(date2);
        System.out.println("date1.after(date2) = "+str);
        return str;
    }
      public void use(){
          Date date1 = new Date();
          Date date2 = new Date();
          System.out.println("date1:"+date1.toString());
          System.out.println("date2:"+date2.toString());
          System.out.println("date1.before(date2) = "+date1.before(date2));
      }

    public static void main(String[] args) {
        DateDemo dateDemo = new DateDemo();
        dateDemo.setDateDemo();
        dateDemo.use();
    }
}
